{"ast":null,"code":"import apiClient from \"../http\";\nimport { getChatOrNew, getChats } from \"../routes\";\nexport default class ChatService {\n  static async getChatsList() {\n    return apiClient.get(getChats());\n  }\n  static async getChatOrNew(otherUserId) {\n    return apiClient.get(getChatOrNew(otherUserId));\n  }\n}","map":{"version":3,"names":["apiClient","getChatOrNew","getChats","ChatService","getChatsList","get","otherUserId"],"sources":["/data/messenger.client/src/services/ChatService.ts"],"sourcesContent":["import apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {getChatOrNew, getChats} from \"../routes\"\nimport {ChatsListResponse} from \"../models/response/ChatsListResponse\";\nimport {ChatsListItem} from \"../models/response/ChatsListItem\";\n\nexport default class ChatService {\n    public static async getChatsList(): Promise<AxiosResponse<ChatsListResponse>> {\n        return apiClient.get<ChatsListResponse>(getChats());\n    }\n\n    public static async getChatOrNew(otherUserId: string): Promise<AxiosResponse<ChatsListItem>> {\n        return apiClient.get<ChatsListItem>(getChatOrNew(otherUserId));\n    }\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,SAAS;AAE/B,SAAQC,YAAY,EAAEC,QAAQ,QAAO,WAAW;AAIhD,eAAe,MAAMC,WAAW,CAAC;EAC7B,aAAoBC,YAAY,GAA8C;IAC1E,OAAOJ,SAAS,CAACK,GAAG,CAAoBH,QAAQ,EAAE,CAAC;EACvD;EAEA,aAAoBD,YAAY,CAACK,WAAmB,EAAyC;IACzF,OAAON,SAAS,CAACK,GAAG,CAAgBJ,YAAY,CAACK,WAAW,CAAC,CAAC;EAClE;AACJ"},"metadata":{},"sourceType":"module"}